package com.ledi.guns.common.persistence.model;

import java.io.Serializable;

import com.baomidou.mybatisplus.enums.IdType;
import com.baomidou.mybatisplus.annotations.TableId;
import com.baomidou.mybatisplus.annotations.TableField;
import com.baomidou.mybatisplus.activerecord.Model;
import com.baomidou.mybatisplus.annotations.TableName;
import java.io.Serializable;

/**
 * <p>
 * 全国行政区划-省市县三级(2017版)
 * </p>
 *
 * @author ledi
 * @since 2017-11-30
 */
@TableName("t_sys_area")
public class SysArea extends Model<SysArea> {

    private static final long serialVersionUID = 1L;

	@TableId(value="id", type= IdType.AUTO)
	private Long id;
    /**
     * 行政区划编码
     */
	private String code;
    /**
     * 父级行政区划编码
     */
	@TableField("parent_code")
	private String parentCode;
    /**
     * 名称
     */
	private String name;


	public Long getId() {
		return id;
	}

	public void setId(Long id) {
		this.id = id;
	}

	public String getCode() {
		return code;
	}

	public void setCode(String code) {
		this.code = code;
	}

	public String getParentCode() {
		return parentCode;
	}

	public void setParentCode(String parentCode) {
		this.parentCode = parentCode;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	@Override
	protected Serializable pkVal() {
		return this.id;
	}

	@Override
	public String toString() {
		return "SysArea{" +
			"id=" + id +
			", code=" + code +
			", parentCode=" + parentCode +
			", name=" + name +
			"}";
	}
}
